The errno in Linux
When executing system calls under Linux, a return value typically indicates success or failure, but this value only indicates success or failure, but does not indicate how successful or failed.Errno is to solve this problem,
There are three types of error reporting usages in the C language standard library.1, errnoerrno is defined in the header file as follows
#ifndef errno
extern int errno;
#endif
An external variable errno an implementation-defined
Errno (Error Report) usage in C language, errno Error Report
There are three forms of error reporting in the C language standard library.
1,Errno
Errno is defined in the header file, as follows:
#ifndef errnoextern int errno;#endif
The external
Lien000034August 24, 20141. errno variable
The file defines the symbol errno and various constants that can be assigned to it. These constants start with the character E. For example, if errno is equal to the constant eacces, a permission error
Ifndef _i386_errno_h#define _i386_errno_h#define EPERM 1/* Operation not permitted * *#define ENOENT 2/* No such file or directory */#define ESRCH 3/* No such process * *#define EINTR 4/* Interrupted system call * *#define EIO 5 */I/O error *
1. Relationship between printf and fprintf 1 printf ()# Include Int printf (const char * format ,...);The printf () function prints the output to stdout (standard output) and other parameters according to the format given by format. For the output
The errno module defines some symbolic error codes, such as enoent ("not Found") and Eperm ("No Permissions").
If you need to distinguish between different error codes, you can use the symbol name.
In Py2, the IOError exception provides a tuple
Python prompts [Errno 32] How to Solve the thread crash error caused by Broken pipe, errnocrash
This example describes how to solve the thread crash error caused by the Python prompt [Errno 32] Broken pipe. Share it with you for your reference. The
C There are three forms of error reporting usage in the Language standard library. 1 , errnoerrno in the The header file is defined in the following#ifndef Errnoextern int errno; #endif external variable errno implementation-defined error
The code is as follows
Copy Code
[root@rhel64-a redhat60as_26x86_64]# Service CVFs start Initiating start of StorNext DSM component Checking Maintenance License ...-The maintenance license status Is:good [OK] Initializing StorNext
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.